using System;
using System.Windows.Forms;

namespace SqlRunner.Readers
{
	/// <summary>
	/// Summary description for ReaderFactory.
	/// </summary>
	public class ReaderFactory
	{
		private ReaderFactory()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		public static IFolderReader GetReader(IDataObject data)
		{
			if (data.GetDataPresent(System.Windows.Forms.DataFormats.CommaSeparatedValue)) return new CsvReader();
			if (data.GetDataPresent(System.Windows.Forms.DataFormats.FileDrop)) return new FileReader();
			throw new ArgumentException(String.Format("Data format/s {0} is/are not implemented", data.GetFormats()));
		}
	}
}
